<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<script type="text/javascript">
	function hilangkan_pilihan(){
		document.getElementById("pilihan").style.display="none";	
	}
	function munculkan_pilihan(){
		document.getElementById("pilihan").style.display="";	
	}
	
	
	var idrow_1 = 1;
	
	function tambah_1(){
		var x=document.getElementById('tab_pil').insertRow(idrow_1);
		var td1=x.insertCell(0);
		td1.innerHTML="<input type='text' name='pilihan[]' id='pilihan' />";
		idrow_1++;
	}
	
	function hapus_1(){
		if(idrow_1>1){
			var x=document.getElementById('tab_pil').deleteRow(idrow_1-1);
			idrow_1--;	
		}
	}
</script>
</head>

<body>
<form id="form1" name="form1" method="post" action="Input_Poll.php">
   <table align="center" width="569" border="1">
      <tr>
         <td width="150" scope="col">Jenis Pertanyaan</td>
         <td width="403" scope="col">
            <label>
               <input onclick="munculkan_pilihan()" name="jenis" type="radio" id="jenis_0" value=1 checked="checked" />
               Single Choice</label>
            <label>
               <input  onclick="munculkan_pilihan()" type="radio" name="jenis" value=2 id="jenis_1" />
               Multiple Choice</label>
            <label>
               <input onclick="hilangkan_pilihan()" type="radio" name="jenis" value=3 id="jenis_2" />
               Essay</label>
      </tr>
      <tr>
         <td>Kelompok</td>
         <td><label for="kelompok"></label>
         <input type="text" name="kelompok" id="kelompok" /></td>
      </tr>
      <tr>
         <td>No</td>
         <td><input type="text" name="nomor" id="nomor" /></td>
      </tr>
      <tr>
         <td>Pertanyaan</td>
         <td><label for="pertanyaan"></label>
         <input name="pertanyaan" type="text" id="pertanyaan" size="75" maxlength="200" /></td>
      </tr>
      <tr id="pilihan">
         <td height="30">Pilihan</td>
         <td>
         	<table id="tab_pil" width="403" border="0">
            	<tr>
               		<td width="397" align="left" scope="col"><input type="text" name="pilihan[]" id="pilihan[]" />
            	</tr>
                <tr><td><input type="button" value="tambah" onclick="tambah_1()" />&nbsp;<input type="button" value="kurang" onclick="hapus_1()" /></td></tr>
         	</table>
         </td>
      </tr>
      <tr>
         <td></td>
         <td><input value="submit" name="submit" type="submit" />&nbsp;&nbsp;<input name="reset" type="reset" value="reset" /></td>
      </tr>
   </table>
</form>
</body>
</html>